package com.kma.summer2012.client.events;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.kma.summer2012.shared.model.UICrumbsRequest;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: EUGENE
 * Date: 2/19/13
 * Time: 11:24 PM
 * To change this template use File | Settings | File Templates.
 */
public class FillCellTableEvent extends GwtEvent<FillCellTableEvent.FillCellTableEventHandler> {
    private static Type<FillCellTableEventHandler> TYPE = new Type<FillCellTableEventHandler>();
    public List<UICrumbsRequest> requests;
    public Integer tableID;

    public FillCellTableEvent(List<UICrumbsRequest> list, Integer tableId) {
        this.requests = list;
        this.tableID = tableId;
    }

    @Override
    public Type<FillCellTableEventHandler> getAssociatedType() {
        return TYPE;
    }

    public static Type<FillCellTableEventHandler> getType() {
        return TYPE;
    }

    @Override
    protected void dispatch(FillCellTableEventHandler importRequestEventHandler) {
        importRequestEventHandler.onFillCellTable(this);
    }

    public interface FillCellTableEventHandler extends EventHandler {
        void onFillCellTable(FillCellTableEvent event);
    }
}
